//基础变量
package main

import "fmt"

var globalVar = "global Var" //globalVar := "global Var1" 在func外不能这样用
var globalVar1 = "global Var1"

/*
批量声明变量 可以用在func里面
var (
	globalVar = "global Var"
	globalVar1 = "global Var1"
)
*/
func main() {
	fmt.Println(globalVar)
	fmt.Println(globalVar1)
	var a int = 1
	a = 33      //变量已声明，不需要加 :
	b := "2233" // var b string = "2233"
	fmt.Println("a =", a)
	fmt.Println("b =", b)
	var a1 uint8 = 250
	fmt.Println("a1 =", a1)
	var a2 float64 = 1.12345678987654321
	fmt.Println("a2 =", a2)
	var c, d, e int = 1, 3, 4
	fmt.Println(c, d, e)
	var name, age, money = "Ryan", 29, 90000.21
	//name,age,money := "Ryan",29,90000.21
	fmt.Println("name =", name, "age =", age, "money =", money)
}
